'use strict';

module.exports = app => {
  const { router, controller, middleware } = app;

  // router.prefix('/api/v1');

  // router.get('/tester', controller.v1.tester.index); // --后台登出

  // WEB权限相关
  // router.get('/access/count/integral', controller.v1.access.count.integral); // --后台获取个人信息
  // router.resources('accessIntegralIns', '/integralIns', controller.v1.access.integralIns); // --我种的幸运草
  // router.resources('accessIntegrals', '/integrals', controller.v1.access.integrals); // --我的幸运草

  // 微信小程序
  // router.resources('miniPogram', '/access/weapp', controller.v1.access.weapp);
  // router.post('miniPogram', '/access/weapp/login', controller.v1.access.weapp.login);
  // 微信公众号
  // router.resources('wechatPublic', '/access/wechat', controller.v1.access.wechat);

  // 第三方服务相关
  // router.resources('serviceGeeTest', '/service/geeTest', controller.v1.service.geeTest); // --极验验证
  // router.resources('serviceCaptcha', '/service/captcha', controller.v1.service.captcha);

  // 前端台

  // 后台 登录后 app.jwt
  // router.resources('dashboards', '/dashboards', controller.v1.dashboards.index);
  // router.resources('uploads', '/uploads', controller.v1.uploads.index);
  // router.resources('goods', '/goods', middleware.authHandler(), controller.v1.goods.index);
  // router.resources('goodsUsers', '/goods/:goodsId/users', controller.v1.goods.users);
  // router.resources('goodsIntegrals', '/goods/:goodsId/integrals', controller.v1.goods.integrals);
  // router.resources('banners', '/banners', controller.v1.banners.index);
  // router.resources('apply', '/apply', controller.v1.apply.index);
  // router.resources('users', '/users', controller.v1.users.index); // --所有用户的列表
  // router.resources('usersIntegrals', '/users/:userId/integrals', controller.v1.users.integrals); // --用户的幸运草列表
  // router.resources('usersGoods', '/users/:userId/goods', controller.v1.users.goods); // POST用户抽奖
  // router.resources('addresses', '/addresses', controller.v1.addresses.index);
  // router.resources('records', '/records/winnings', controller.v1.records.index);
  // router.resources('questions', '/questions', controller.v1.questions.index);
  // router.resources('feedbacks', '/feedbacks', controller.v1.feedbacks.index);
  // router.resources('settings', '/settings', controller.v1.settings.index);

};